<!--
 * @Authoer: hujun
 * @Description:用户授权机构管理
 * @Date 2017/12/27 14:16
 * @Modified By:
 *
-->

<div id="userGrantOrg">
	<yu-panel :title="$t('userGrantOrgManager.yhsqgl')">
		<el-form-q form="query" :field-data="queryFields" :buttons="queryButtons"></el-form-q>
		<yu-toolBar>
			<el-button @click="openCreateFn">{{ $t('userGrantOrgManager.xz') }}</el-button>
			<el-button @click="openEditFn">{{ $t('userGrantOrgManager.xg') }}</el-button>
			<el-button @click="deletestFn">{{ $t('userGrantOrgManager.sc') }}</el-button>
			<el-button @click="useFn">{{ $t('userGrantOrgManager.qy') }}</el-button>
			<el-button @click="unUseFn">{{ $t('userGrantOrgManager.ty') }}</el-button>
		</yu-toolBar>
		<el-table-x ref="grantTable" :checkbox="mainGrid.checkbox" :max-height="mainGrid.height" :data-url="mainGrid.dataUrl" :data-params="mainGrid.dataParams"
		 :table-columns="mainGrid.tableColumns" @custom-detail-click="openDetailFn">
		</el-table-x>
	</yu-panel>
	<el-dialog-x :center="true" :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" center=true height="200px">
		<el-form-x ref="grantInfoform" :group-fields="updateFields" :disabled="formDisabled" label-width="80px"></el-form-x>
		<div align="center">
			<el-button @click="dialogFormVisible = false">{{ $t('userGrantOrgManager.gb') }}</el-button>
			<el-button v-if="dialogStatus=='create'" type="primary" @click="saveCreateFn()">{{ $t('userGrantOrgManager.qd') }}</el-button>
			<el-button v-if="dialogStatus=='update'" type="primary" @click="saveEditFn()">{{ $t('userGrantOrgManager.qd') }}</el-button>
		</div>
	</el-dialog-x>
</div>